import java.util.Scanner;
public class Zuoye6 {
    public static void main(String[] args) {
        Scanner in=new Scanner(System.in);
        int i=1;
        int a[]=new int[10];
        for(i=1;i<=a.length-1;i++)
        {
            System.out.print("请输入第"+i+"个整数：");
            a[i]=in.nextInt();
        }
        System.out.print(a+" ");
        int b=1;
        int c=0;
        int d=0;
        for(i=1;i<=a.length-1;i++)
        {
            for(;b<=10;b++)
            {
                if(b<=a[i])
                {
                    b=a[i];
                    c=i;
                    d=b;
                }
                else
                    break;
            }
        }
        System.out.println("\n最大值是："+d+"\n"+"位置是：第"+c+"个");
    }
}
